﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WebCrawlerTools
{
    class SVal : SNode
    {
        private string val;

        public SVal()
        {
            type = CNodeType.SVal;
        }

        public SVal(String content)
        {
            this.Content = content;
            type = CNodeType.SVal;
        }

        public string Value
        {
            get
            {
                return val;
            }
            set
            {
                val = value;
            }
        }

        public override void reset()
        {
            this.StartPos = -1;
            this.EndPos = -1;
            val = "";
        }

        /// <returns>現在の <see cref="T:System.Object"/> を表す <see cref="T:System.String"/>。</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("SVal[FieldName:");
            sb.Append(Content);
            sb.Append("]Value:");
            sb.Append(val);
            sb.Append("]");
            return sb.ToString();
        }
    }
}
